package ssen.mvc.ondisplay {
import ssen.mvc.core.IContext;
import ssen.mvc.core.IContextView;
import ssen.mvc.core.IContextViewInjector;

public class DisplayContextViewInjector implements IContextViewInjector {
	private var context:IContext;

	public function DisplayContextViewInjector(context:IContext=null) {
		this.context=context;
	}

	public function injectInto(contextView:IContextView):void {
		if (!contextView.contextInitialized) {
			contextView.initialContext(context);
		}
	}

	public function dispose():void {
		context=null;
	}

}
}
